Optimal. Leaf size=129 \[ \frac {x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 b n x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {2 b^2 n^2 x^{1-m} (f x)^{-1+m} \text {Li}_3\left (-\frac {e x^m}{d}\right )}{e m^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2377, 2375,
2421, 6724} \begin {gather*} \frac {2 b n x^{1-m} (f x)^{m-1} \text {PolyLog}\left (2,-\frac {e x^m}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m^2}-\frac {2 b^2 n^2 x^{1-m} (f x)^{m-1} \text {PolyLog}\left (3,-\frac {e x^m}{d}\right )}{e m^3}+\frac {x^{1-m} (f x)^{m-1} \log \left (\frac {e x^m}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2375
Rule 2377
Rule 2421
Rule 6724
Rubi steps
\begin {align*} \int \frac {(f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2}{d+e x^m} \, dx &=\left (x^{1-m} (f x)^{-1+m}\right ) \int \frac {x^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2}{d+e x^m} \, dx\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x^m}{d}\right )}{e m}-\frac {\left (2 b n x^{1-m} (f x)^{-1+m}\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x^m}{d}\right )}{x} \, dx}{e m}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 b n x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {\left (2 b^2 n^2 x^{1-m} (f x)^{-1+m}\right ) \int \frac {\text {Li}_2\left (-\frac {e x^m}{d}\right )}{x} \, dx}{e m^2}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 b n x^{1-m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {2 b^2 n^2 x^{1-m} (f x)^{-1+m} \text {Li}_3\left (-\frac {e x^m}{d}\right )}{e m^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(502\) vs. \(2(129)=258\).
time = 0.15, size = 502, normalized size = 3.89 \begin {gather*} \frac {x^{-m} (f x)^m \left (3 a^2 m^3 \log (x)-6 a b m^3 n \log ^2(x)+4 b^2 m^3 n^2 \log ^3(x)+6 a b m^3 \log (x) \log \left (c x^n\right )-6 b^2 m^3 n \log ^2(x) \log \left (c x^n\right )+3 b^2 m^3 \log (x) \log ^2\left (c x^n\right )+3 b^2 m^2 n^2 \log ^2(x) \log \left (1+\frac {d x^{-m}}{e}\right )+3 a^2 m^2 \log \left (d-d x^m\right )-6 a b m^2 n \log (x) \log \left (d-d x^m\right )+3 b^2 m^2 n^2 \log ^2(x) \log \left (d-d x^m\right )+6 a b m^2 \log \left (c x^n\right ) \log \left (d-d x^m\right )-6 b^2 m^2 n \log (x) \log \left (c x^n\right ) \log \left (d-d x^m\right )+3 b^2 m^2 \log ^2\left (c x^n\right ) \log \left (d-d x^m\right )+6 a b m^2 n \log (x) \log \left (d+e x^m\right )-6 b^2 m^2 n^2 \log ^2(x) \log \left (d+e x^m\right )-6 a b m n \log \left (-\frac {e x^m}{d}\right ) \log \left (d+e x^m\right )+6 b^2 m n^2 \log (x) \log \left (-\frac {e x^m}{d}\right ) \log \left (d+e x^m\right )+6 b^2 m^2 n \log (x) \log \left (c x^n\right ) \log \left (d+e x^m\right )-6 b^2 m n \log \left (-\frac {e x^m}{d}\right ) \log \left (c x^n\right ) \log \left (d+e x^m\right )-6 b^2 m n^2 \log (x) \text {Li}_2\left (-\frac {d x^{-m}}{e}\right )-6 b m n \left (a-b n \log (x)+b \log \left (c x^n\right )\right ) \text {Li}_2\left (1+\frac {e x^m}{d}\right )-6 b^2 n^2 \text {Li}_3\left (-\frac {d x^{-m}}{e}\right )\right )}{3 e f m^3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.06, size = 0, normalized size = 0.00 \[\int \frac {\left (f x \right )^{-1+m} \left (a +b \ln \left (c \,x^{n}\right )\right )^{2}}{d +e \,x^{m}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 181, normalized size = 1.40 \begin {gather*} -\frac {{\left (2 \, b^{2} f^{m - 1} n^{2} {\rm polylog}\left (3, -\frac {x^{m} e}{d}\right ) - 2 \, {\left (b^{2} m n^{2} \log \left (x\right ) + b^{2} m n \log \left (c\right ) + a b m n\right )} f^{m - 1} {\rm Li}_2\left (-\frac {x^{m} e + d}{d} + 1\right ) - {\left (b^{2} m^{2} \log \left (c\right )^{2} + 2 \, a b m^{2} \log \left (c\right ) + a^{2} m^{2}\right )} f^{m - 1} \log \left (x^{m} e + d\right ) - {\left (b^{2} m^{2} n^{2} \log \left (x\right )^{2} + 2 \, {\left (b^{2} m^{2} n \log \left (c\right ) + a b m^{2} n\right )} \log \left (x\right )\right )} f^{m - 1} \log \left (\frac {x^{m} e + d}{d}\right )\right )} e^{\left (-1\right )}}{m^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (f x\right )^{m - 1} \left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{d + e x^{m}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (f\,x\right )}^{m-1}\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{d+e\,x^m} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________